package com.jiazhong.shixi.boot.controller;

import com.jiazhong.shixi.boot.util.JsonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.View;

@RestController
@RequestMapping("/first")
public class FirstController {
    private final View error;

    public FirstController(View error) {
        this.error = error;
    }

    @RequestMapping("/a")
    public String a(){
        return "This is FirstController`a method!";
    }
    @RequestMapping("/b")
    public JsonResult b(){
       return new JsonResult<>(true,200,"This is FirstController`a method!","");
    }
}
